<?php

require_once("../config/sina_config.php");
require_once("saetv2.ex.class.php");

function sina_get_username($access_token)
{
	$sae_obj = new SaeTClientV2(WB_AKEY, WB_SKEY, $access_token);
	$uid_get = $sae_obj->get_uid();
	
	$user_message = $sae_obj->show_user_by_id($uid_get['uid']);
	
	return $user_message['screen_name'];
}

function sina_add_weibo($access_token, $content)
{
	$sae_obj = new SaeTClientV2(WB_AKEY, WB_SKEY, $access_token);
	
	$ret = $sae_obj->update($content);
	return $ret;
}
?>